//
//  UserSectionTwoCell.m
//  Arts1
//
//  Created by apple on 15/8/29.
//  Copyright (c) 2015年 Arts1. All rights reserved.
//

#import "UserSectionTwoCell.h"
#import "AllHeader.h"

@implementation UserSectionTwoCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        [self creactView];
    }
    return self;
}

/**
 *  创建视图控制器
 */
- (void)creactView
{
    _backGroundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, (SCREEN_WIDTH - 30) / 2, 240 * HEIGHT)];
    //添加阴影
    [UIView viewShadowColor:_backGroundView];
    _backGroundView.backgroundColor = kRandomColor;
    _backGroundView.layer.cornerRadius = 5;
    [self.contentView addSubview:_backGroundView];
    
    _imageBig = [[UIImageView alloc] initWithFrame:CGRectMake(_backGroundView.left, _backGroundView.top, _backGroundView.width, _backGroundView.height)];
    //添加阴影
//    [UIView viewShadowColor:_imageBig];
    _imageBig.backgroundColor = kRandomColor;
    [_imageBig setContentMode:(UIViewContentModeScaleAspectFill)];
    _imageBig.layer.cornerRadius = 5;
    _imageBig.layer.masksToBounds = YES;
    [_backGroundView addSubview:_imageBig];
}

- (void)setModel:(MyCollectPhotoModel *)model
{
    _model = model;
    [_imageBig sd_setImageWithURL:[NSURL URLWithString:_model.img] placeholderImage:nil options:SDWebImageRetryFailed | SDWebImageLowPriority ];
    
}

@end
